import { defineComponent, reactive } from 'vue'
import { useTimer } from '../hooks/useTimer'
import { useTitle } from '../hooks/useTitle'
import css from './test.module.css'

/*
<route>
meta:
  layout: TestLayout
</route>
 */
export default defineComponent({
  name: 'TestPage',
  setup() {
    const s = reactive({
      time: new Date().toLocaleString()
    })
    useTitle('Test page title')
    useTimer(() => {
      s.time = new Date().toLocaleString()
    }, 1000)
    return s
  },
  render() {
    return <div class={css.red}>test page. current time: {this.time}</div>
  }
})
